package com.haredot.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.solr.client.solrj.beans.Field;

import java.io.Serial;
import java.io.Serializable;

/**
 *  存储到 redis 有序集合中的 资源信息， 只包含首页需要用到的内容。<br/>
 *
 */
public class ResourceViewVo implements Serializable {

    @Serial
    private static final long serialVersionUID = -3431047424189330073L;

    @Field
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 资源名
     */
    @Field
    private String resourceName;

    /**
     * 资源积分
     */
    @Field("vscore")
    private Integer score;

    /**
     * 资源大小
     */
    @Field
    private Long size;

    /**
     * 资源扩展名
     */
    @Field
    private String ext;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }
}
